import React from 'react';
import { FlatList, SafeAreaView, StyleSheet, Text, View } from 'react-native';

const styles = StyleSheet.create({
  item: {
    marginTop: 10,
    fontSize: 18,
    width: '100%',
    height: 45,
    backgroundColor: 'pink',
  },
});

function App() {
  return (
   <SafeAreaView>
    <Text style={{width:'100%',height:20,marginTop:10,backgroundColor:'red',fontSize:18}}>我是局部样式</Text>
    <Text style={styles.item}>我是全局样式1</Text>
    <Text style={styles.item}>我是全局样式1</Text>
    <Text style={styles.item}>我是全局样式1</Text>
    <Text style={styles.item}>我是全局样式1</Text>
   </SafeAreaView>
  );
}

export default App;